Skip to content

test: Add #[serial] to GitHub env var tests#2832

Merged
runningcode merged 1 commit intomasterfrom
no/serial-github-env-tests
Oct 9, 2025
Merged

test: Add #[serial] to GitHub env var tests#2832
runningcode merged 1 commit intomasterfrom
no/serial-github-env-tests

Conversation

@runningcode
Copy link
Copy Markdown
Contributor

@runningcode runningcode commented Oct 9, 2025

Summary

  • Add #[serial(github_env)] to test_get_github_pr_number
  • Add #[serial(github_env)] to test_get_github_base_ref
  • Rename serial key from github_event_path to github_env for all tests

These tests manipulate GitHub environment variables (GITHUB_EVENT_PATH, GITHUB_EVENT_NAME, GITHUB_REF, GITHUB_BASE_REF) and should not run in parallel with other tests that use the same environment variables to avoid race conditions.

The serial key has been renamed from github_event_path to github_env to better reflect that it encompasses all GitHub environment variables, not just GITHUB_EVENT_PATH.

🤖 Generated with Claude Code

@runningcode runningcode requested review from a team and szokeasaurusrex as code owners October 9, 2025 12:48
cursor[bot]

This comment was marked as outdated.

Add #[serial(github_env)] attribute to test_get_github_pr_number and test_get_github_base_ref to prevent parallel execution with other tests that manipulate GitHub environment variables.

Also rename the serial key from github_event_path to github_env to better reflect that it covers all GitHub environment variables (GITHUB_EVENT_PATH, GITHUB_EVENT_NAME, GITHUB_REF, GITHUB_BASE_REF).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@runningcode runningcode force-pushed the no/serial-github-env-tests branch from 47654ff to 76b072b Compare October 9, 2025 13:02
Copy link
Copy Markdown
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🚀

@runningcode runningcode enabled auto-merge (squash) October 9, 2025 13:04
Comment thread src/utils/vcs.rs

#[test]
#[serial(github_event_path)]
#[serial(github_env)]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Test Grouping Issue Causes Interference

Changing the #[serial] attribute from github_event_path to github_env groups tests manipulating GITHUB_EVENT_PATH with tests that use other GITHUB_* environment variables. This removes the logical separation for tests relying on GITHUB_EVENT_PATH, potentially causing interference.

Additional Locations (1)

Fix in Cursor Fix in Web

@runningcode runningcode merged commit a876ce8 into master Oct 9, 2025
25 checks passed
@runningcode runningcode deleted the no/serial-github-env-tests branch October 9, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants